package com.notetool.util.config;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class NodeHelper
{

    ////////////////////
    // Public static methods
    public static NodeList getElementsByTagName (Node node, String name)
    {
        if (node instanceof Document)
            return ((Document)node).getElementsByTagName (name);
        else if (node instanceof Element)
            return ((Element)node).getElementsByTagName (name);
       
        return null;
    }
    
}
